package model

import (
	"day14/video-share/video-server/basic/config"
	"gorm.io/gorm"
)

type Video struct {
	gorm.Model
	Title    string `gorm:"type:varchar(30);comment:标题"`
	Content  string `gorm:"type:varchar(30);comment:内容"`
	ImageUrl string `gorm:"type:varchar(300);comment:封面"`
	VideoUrl string `gorm:"type:varchar(300);comment:视频地址"`
}

func CreateVideo(v *Video) error {

	return config.DB.Create(&v).Error
}
